﻿using System.ComponentModel;
using PdfRotator.Annotations;

namespace PdfRotator.ViewModel
{
    class FileViewModel : INotifyPropertyChanged
    {
        private PdfRotationStatus _status;

        public string Name { get; set; }

        public string Path { get; set; }

        public PdfRotationStatus Status
        {
            get { return _status; }
            set
            {
                _status = value;
                OnPropertyChanged("Status");
            }
        }

        #region INotifyPropertyChanged

        public event PropertyChangedEventHandler PropertyChanged;

        [NotifyPropertyChangedInvocator]
        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
        }

        #endregion
    }
}